package per.com.controller;

import com.fasterxml.jackson.annotation.JsonView;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import per.com.bean.BaseBean;
import per.com.bean.ConfigBean;
import per.com.dao.ConfigDao;
import per.com.service.impl.ConfigService;
import per.com.service.impl.ConfigServiceImpl;

import javax.annotation.Resource;

@Controller
public class ConfigController {
    @Resource
    private ConfigDao configDao;

    @ResponseBody
    @RequestMapping(value = "/save", method = RequestMethod.POST)
    public BaseBean add(ConfigBean configBean) {
        configDao.add(configBean);
        return new BaseBean(1, "successs");
    }
}
